﻿<%@ Page Title="Admin Rediger Afdeling" Language="C#" MasterPageFile="~/Site.Master" AutoEventWireup="true" CodeBehind="adminDepartmentEdit.aspx.cs" Inherits="UCNKompetenceBors.Admin.adminDepartmentEdit" %>

<asp:Content ID="Content1" ContentPlaceHolderID="head" runat="server">
</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="ContentPlaceHolder1" runat="server">
    <script language="javascript">
        function Hide() {
            document.getElementById('<%=lblConfirmUpdatedDepartment.ClientID %>').style.display = 'none';
            return false;
        }
    </script>

    <div id="adminWrapper" class="contentSmallWrapper floatLeft">
        <div id="adminSubMenuBox" class="submenuBox floatLeft">
            <div class="subMenuBoxContent">
                <ul>
                    <li>
                        <asp:HyperLink ID="hyLinkAdminDashboard" runat="server" Text="Admin Dashboard"></asp:HyperLink></li>
                    <li>
                        <asp:HyperLink ID="hyLinkUserHandling" runat="server" Text="Brugerhåndtering"></asp:HyperLink></li>
                    <li>
                        <asp:HyperLink ID="hyLinkAdminExchange" runat="server" Text="Køb og Salg"></asp:HyperLink></li>
                    <li>
                        <asp:HyperLink ID="hyLinkNewsHandling" runat="server" Text="Nyhedshåndtering"></asp:HyperLink></li>
                    <li>
                        <asp:HyperLink ID="hyLinkEditInformation" runat="server" Text="Ret Information"></asp:HyperLink></li>
                    <li>
                        <asp:HyperLink ID="hylinkContactPersons" runat="server" Text="Kontaktpersoner"></asp:HyperLink>
                    </li>
                    <li>
                        <asp:HyperLink ID="hylinkDepartment" runat="server" Text="Afdelinger" ForeColor="#FF9933"></asp:HyperLink>
                        <ul>
                            <li>
                                <asp:HyperLink ID="hylinkDepartmentCreate" runat="server" Text="Opret afdeling"></asp:HyperLink></li>
                        </ul>
                    </li>
                    <li>
                        <asp:HyperLink ID="hyLinkResetUsers" runat="server" Text="Reset Brugere"></asp:HyperLink></li>
                </ul>
            </div>
        </div>

        <div id="adminContentBox" class="contentBoxSmall floatLeft">
            <div id="adminContentBoxContent" class="floatLeft">
                <div class="inputFormSmall">
                    <div class="inputFormSmallLeft floatLeft">
                        <div class="inputFormSmallRow floatLeft">
                            <asp:Label ID="lblAdminContentHeader" runat="server" Text="Rediger Afdeling" CssClass="contentTitle"></asp:Label>
                        </div>
                        <div class="inputFormSmallRow floatLeft">
                            <div class="inputFormSmallCellLeft floatLeft">
                                <asp:Label ID="lblEditDepartmentName" runat="server" Text="Navn:"></asp:Label>
                            </div>
                            <div class="inputFormSmallCellRight floatRight">
                                <asp:TextBox ID="txtEditDepartmentName" runat="server" Width="300px"></asp:TextBox>
                                <asp:RequiredFieldValidator ID="rfvalName" runat="server" ErrorMessage="Name is required" ToolTip="Name is required" Text="*" ControlToValidate="txtEditDepartmentName" ValidationGroup="AdminEditDepartment" ForeColor="Red"></asp:RequiredFieldValidator>
                            </div>
                        </div>

                        <div class="inputFormSmallRow floatLeft">
                            <div class="inputFormSmallCellLeft floatLeft">
                                <asp:Label ID="lblEditDepartmentAddress" runat="server" Text="Adresse:"></asp:Label>
                            </div>
                            <div class="inputFormSmallCellRight floatRight">
                                <asp:TextBox ID="txtEditDepartmentAddress" runat="server" Width="300px"></asp:TextBox>
                                <asp:RequiredFieldValidator ID="rfvalAddress" runat="server" ErrorMessage="Address is required" ToolTip="Address is required" Text="*" ControlToValidate="txtEditDepartmentAddress" ValidationGroup="AdminEditDepartment" ForeColor="Red"></asp:RequiredFieldValidator>
                            </div>
                        </div>

                        <div class="inputFormSmallRow floatLeft">
                            <div class="inputFormSmallCellLeft floatLeft">
                                <asp:Label ID="lblEditDepartmentZipCity" runat="server" Text="Postnummer og By:"></asp:Label>
                            </div>
                            <div class="inputFormSmallCellRight floatRight">
                                <asp:TextBox ID="txtEditDepartmentZipCode" runat="server" Width="100px" MaxLength="4"></asp:TextBox>
                                <asp:RequiredFieldValidator ID="rfvalZipCode" runat="server" ErrorMessage="Zip code is required" ToolTip="Zip Code is required" Text="*" ControlToValidate="txtEditDepartmentZipCode" ValidationGroup="AdminEditDepartment" ForeColor="Red"></asp:RequiredFieldValidator>
                                <asp:TextBox ID="txtEditDepartmentCity" runat="server" Width="183px"></asp:TextBox>
                                <asp:RequiredFieldValidator ID="rfvalCity" runat="server" ErrorMessage="City is required" ToolTip="City is required" Text="*" ControlToValidate="txtEditDepartmentCity" ValidationGroup="AdminEditDepartment" ForeColor="Red"></asp:RequiredFieldValidator>
                            </div>
                        </div>

                        <div class="inputFormSmallRow floatLeft">
                            <div class="inputFormSmallCellLeft floatLeft">
                                <asp:Label ID="lblEditDepartmentEmail" runat="server" Text="E-mail:"></asp:Label>
                            </div>
                            <div class="inputFormSmallCellRight floatRight">
                                <asp:TextBox ID="txtEditDepartmentEmail" runat="server" Width="300px"></asp:TextBox>
                                <asp:RequiredFieldValidator ID="rfvalEmail" runat="server" ErrorMessage="E-mail is required" ToolTip="E-mail is required" Text="*" ControlToValidate="txtEditDepartmentEmail" ValidationGroup="AdminEditDepartment" ForeColor="Red"></asp:RequiredFieldValidator>
                                <asp:RegularExpressionValidator ID="regexvalEmail" runat="server" ErrorMessage="Den valgte E-mail er ugyldig" ValidationExpression="^.+@[^\.].*\.[a-z]{2,}$" ControlToValidate="txtEditDepartmentEmail" ValidationGroup="AdminEditDepartment" ToolTip="Den valgte E-mail er ugyldig" Display="Dynamic" Text="*" ForeColor="Red"></asp:RegularExpressionValidator>
                            </div>
                        </div>

                        <div class="inputFormSmallRow floatLeft">
                            <div class="inputFormSmallCellLeft floatLeft">
                                <asp:Label ID="lblEditDepartmentPhone" runat="server" Text="Telefon:"></asp:Label>
                            </div>
                            <div class="inputFormSmallCellRight floatRight">
                                <asp:TextBox ID="txtEditDepartmentPhone" runat="server" Width="300px"></asp:TextBox>
                                <asp:RequiredFieldValidator ID="rfvalPhone" runat="server" ErrorMessage="Phone is required" ToolTip="Phone is required" Text="*" ControlToValidate="txtEditDepartmentPhone" ValidationGroup="AdminEditDepartment" ForeColor="Red"></asp:RequiredFieldValidator>
                                <asp:RegularExpressionValidator ID="regexvalPhone" runat="server" ErrorMessage="Det valgte telefonnummer er ugyldigt" ToolTip="Det valgte telefonnummer er ugyldigt" ValidationGroup="AdminEditDepartment" ValidationExpression="^((\(?\+45\)?)?)(\s?\d{2}\s?\d{2}\s?\d{2}\s?\d{2})$" ControlToValidate="txtEditDepartmentPhone" Text="*" ForeColor="Red" Display="Dynamic"></asp:RegularExpressionValidator>
                            </div>
                        </div>

                        <div class="inputFormSmallRow floatLeft">
                            <div class="inputFormSmallCellLeft floatLeft">
                                <asp:Label ID="lblEditDepartmentFax" runat="server" Text="Fax:"></asp:Label>
                            </div>
                            <div class="inputFormSmallCellRight floatRight">
                                <asp:TextBox ID="txtEditDepartmentFax" runat="server" Width="300px"></asp:TextBox>
                                <asp:RegularExpressionValidator ID="regexvalFax" runat="server" ErrorMessage="Den valgte fax er ugyldig" ToolTip="Den valgte fax er ugyldig" ValidationGroup="AdminEditDepartment" ValidationExpression="^((\(?\+45\)?)?)(\s?\d{2}\s?\d{2}\s?\d{2}\s?\d{2})$" ControlToValidate="txtEditDepartmentFax" Text="*" ForeColor="Red" Display="Dynamic"></asp:RegularExpressionValidator>
                            </div>
                        </div>

                        <div class="inputFormSmallRow floatLeft">
                            <asp:Image ID="imgEditDepartmentImage" runat="server" Width="100px" Height="100px" />
                        </div>

                        <div class="inputFormSmallRow floatLeft">
                            <div class="inputFormSmallCellLeft floatLeft">
                                <asp:Label ID="lblEditDepartmentImage" runat="server" Text="Billede:"></asp:Label>
                            </div>
                            <div class="inputFormSmallCellRight floatRight">
                                <asp:FileUpload ID="fuEditDepartmentImage" runat="server" />
                                <br />
                                <asp:RegularExpressionValidator ID="regexvalImage" runat="server" ForeColor="Red" ControlToValidate="fuEditDepartmentImage" ValidationGroup="AdminEditDepartment" ErrorMessage="Filen du prøver at uploade er ikke tilladt" ValidationExpression=".*(\.[Jj][Pp][Gg]|\.[Gg][Ii][Ff]|\.[Jj][Pp][Ee][Gg]|\.[Pp][Nn][Gg])"></asp:RegularExpressionValidator>
                            </div>
                        </div>

                        <div class="inputFormSmallRow floatLeft">
                            <div class="floatLeft">
                                <asp:Label ID="lblConfirmUpdatedDepartment" runat="server"></asp:Label>
                            </div>
                            <div class="floatRight">
                                <asp:Button ID="btnCancelEditDepartment" runat="server" Text="Fortryd" CssClass="button" OnClick="btnCancelEditDepartment_Click" />
                                <asp:Button ID="btnEditDepartment" runat="server" Text="Rediger Afdeling" ValidationGroup="AdminEditDepartment" CssClass="button" OnClick="btnEditDepartment_Click" />
                            </div>
                        </div>
                    </div>
                    <div class="inputFormSmallRight floatRight">
                        <asp:ValidationSummary ID="valSumAdminEditDepartment" ValidationGroup="AdminEditDepartment" runat="server" HeaderText="Følgende fejl blev fundet:" ForeColor="Red" />
                    </div>
                </div>
            </div>
        </div>
    </div>
</asp:Content>
